/* 主样式文件 */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --success-color: #27ae60;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --dark-bg: #1a1d23;
  --card-bg: #ffffff;
  --border-color: #e1e8ed;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
}

/* 通用样式 */
.btn-primary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-primary:hover {
  background-color: #2980b9;
  border-color: #2980b9;
}

.btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.btn-danger {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
}

/* 交易所样式 */
.exchange-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  color: white;
}

.exchange-logo {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
}

.exchange-logo img {
  height: 32px;
  margin-right: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-weight: 500;
}

.user-role {
  font-size: 12px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
}

.exchange-sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 250px;
  background: white;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 999;
}

.sidebar-heading {
  padding: 16px 20px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item {
  margin: 0;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.sidebar-nav-link i {
  width: 24px;
  margin-right: 12px;
  font-size: 18px;
}

.sidebar-nav-link:hover {
  background: #f8f9fa;
  color: var(--secondary-color);
  text-decoration: none;
}

.sidebar-nav-link.active {
  background: #e3f2fd;
  color: var(--secondary-color);
  border-left-color: var(--secondary-color);
  font-weight: 500;
}

.exchange-content {
  margin-left: 250px;
  margin-top: 60px;
  padding: 24px;
  min-height: calc(100vh - 60px);
}

.exchange-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 24px;
  overflow: hidden;
}

.exchange-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exchange-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.exchange-card-body {
  padding: 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.stock-table {
  width: 100%;
  margin-bottom: 0;
}

.stock-table thead th {
  border-top: none;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--text-primary);
  background: #f8f9fa;
}

.stock-table tbody tr {
  transition: background 0.2s;
}

.stock-table tbody tr:hover {
  background: #f8f9fa;
}

.badge-success {
  background-color: var(--success-color);
}

.badge-primary {
  background-color: var(--secondary-color);
}

.badge-warning {
  background-color: var(--warning-color);
}

/* 表单样式 */
.form-group label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-control {
  border-radius: 6px;
  border: 1px solid var(--border-color);
  padding: 10px 12px;
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 登录/注册页面 */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  padding: 40px;
  width: 100%;
  max-width: 450px;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.auth-card .form-control {
  margin-bottom: 16px;
}

.auth-card .btn {
  width: 100%;
  padding: 12px;
  font-weight: 500;
  margin-top: 8px;
}

.alert {
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.wallet-connect-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f39c12;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.wallet-connect-btn:hover {
  background: #e67e22;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.wallet-address {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 6px;
  word-break: break-all;
}

/* 响应式 */
@media (max-width: 768px) {
  .exchange-sidebar {
    transform: translateX(-100%);
  }
  
  .exchange-content {
    margin-left: 0;
  }
  
  .auth-card {
    margin: 20px;
    padding: 30px 20px;
  }
}




